<script type="text/javascript">
	var data = <?php echo $chart_data;?>; //{minimo:'',maximo:'',nsamples:'',data:[[x1,y1],[x2,y2],...,[xn,yn]]}
			
	$j(document).ready(function(){

		var settings = new ChartSettings();
		settings.init('chartdiv',data);
		settings.setResetID('#btnResetZoom');
		settings.setChartTitle('Registro de Variabilidad de Distensión Arterial');
		settings.setXAxisLabel('Muestras x ms');
		settings.setYAxisLabel('Amplitud');
		
		var mainSeries = new Series();
		mainSeries.init("rawsignal",data.data);
		mainSeries.setLabel('Muestra:');
		mainSeries.setMainSeries(true);
		mainSeries.setConf({showMarker:false, label: mainSeries.getLabel()});

		ChartControl.init(settings);
		ChartControl.addSeries(mainSeries);
		ChartControl.paint();

		Diastole.decorate("#back","div.main-content");
	});
</script>

